<template>
  <div class="venus-list-page">
    <!--自定义资产模板界面-->
    <div class="page-search">
      <el-row type="flex" class="search-list">
        <el-row type="flex" class="list-items">
          <div class="venus-input-box">
            <label>行内资产编码</label>
            <el-input
              v-model="table.jz_spv_table.ftool_code"
              class="venus-input-middle"
              placeholder="请输入行内资产编码"
            />
          </div>
          <div class="venus-input-box">
            <label>资管计划名称</label>
            <el-input
              v-model="table.jz_spv_table.ftool_name"
              class="venus-input-middle"
              placeholder="请输入资管计划名称"
            />
          </div>
        </el-row>
        <div class="venus-btn-box">
          <el-button type="primary" @click="search">查询</el-button>
          <el-button type="primary" @click="reset">重置</el-button>
          <el-button type="primary" @click="toAdd">新增</el-button>
        </div>
      </el-row>
    </div>
    <!--    查询列表返显-->
    <div class="page-list">
      <el-row type="flex" justify="space-between" class="page-list-head">
        <div class="title">查询结果</div>
      </el-row>
      <table-pagination
        :dict-data="dict"
        :table-data="table.jz_spv_table.tableData"
        :table-header-config="table.tableHeaderConfig"
        highlight-current-row
        :total="table.jz_spv_table.total"
        :page-size="table.jz_spv_table.limit"
        :now-page="table.jz_spv_table.nowPage"
        @current-change="currentChange"
        :operation-config="table.operationConfig"
      />
    </div>
  </div>
</template>

<script>
  import * as kk from "../../../../../../utils/k-utils";

  export default {
    name: 'M8asset0205',
    data() { // 数据定义
      return {
        dict: {

        },
        table: {
          tableHeaderConfig: [ // 表头配置
            { prop: 'ftool_code', label: '行内资产编码' },
            { prop: 'ftool_name', label: '资管计划名称' },
            { prop: 'ad_calculation', label: '核算方式' },
            { prop: 'setup_date', label: '成立日' },
            { prop: 'unit_face', label: '单位面值' }
          ],
          operationConfig: { // 表格操作配置
            fixed: 'right',
            width: 200,
            operationButton: [
              // 每一个操作。value:操作文字；func:回调函数
              { value: '修改', func: this.myModify },
              { value: '复制', func: this.myCopy },
              { value: '详情', func: this.myinfo },
              { value: '删除', func: this.myDelete }
            ]
          },
          jz_spv_table: {
            total: 0,
            nowPage: 1,
            limit: 5,
            tableData: [], // 表格数据
            exeid: 'M8asset0205EQ01',//exeid
            ftool_code: '', // 资产类别名称
            ftool_name: '', // 资管计划名称
          }
        }
      }
    },
    mounted() {
      // 初始化调用
      this.init()
    },
    methods: {
      // 页面初始化
      init: function() {
        this.table.jz_spv_table.nowPage = 1 // 初始第一页
        kk.k_load_table(this, 'jz_spv_table', 'custom')
      },
      // 新增页面
      toAdd() {
        this.$router.push('M8asset0205exAdd')
      },
      // 修改页面
      myModify() {
        this.$router.push('M8asset0205exAdd')
      },
      // 复制页面
      myCopy() {
        this.$router.push('M8asset0205exAdd')
      },
      // 详情页面
      myCopy() {
        this.$router.push('M8asset0205exAdd')
      },
      // 删除
      myDelete() {
        // var _this = this
        // this.$confirm('确认删除吗?', '提示', {})
        //   .then(() => {
        //     _this.send_save('custom', 'delTrustee', item).then(rep => {
        //       _this.search()
        //       // 关闭弹出框
        //       _this.dialog.detail.formVisible = false
        //     })
        //   })
        //   .catch(() => { /* 用户取消注销 */ })
      },
      // 事件触发
      search() { // 查询函数
        this.table.jz_spv_table.nowPage = 1 // 初始第一页
        kk.k_load_table(this, 'jz_spv_table', 'custom')
      },
      reset() { // 重置查询框
        this.table.jz_spv_table.ftool_code = ''
        this.table.jz_spv_table.ftool_name = ''
      },
      //下一页
      currentChange(index) {
        this.table.jz_spv_table.nowPage = index;
        kk.k_load_table(this, 'jz_spv_table', 'custom');
      },
    }
  }
</script>

<style scoped>
</style>
